﻿
using System;
using Npgsql;
using System.Data;
using System.Data.SqlTypes;

namespace Forums.Data
{
	public class ConnectionUtils
	{
		
		
		public static IDbConnection  OpenIDbConnection()
		{
			NpgsqlConnection  connection= new NpgsqlConnection("Server=127.0.0.1;Port=5432;UserId=postgres;Password=postgres;Database=Forum;");
			
			connection.Open();
			return connection ;
		}
		public static  void CloseIDbConnection(IDbConnection con)
		{

			con.Close();
		}
		
		
	}
}
